package com.maiji.cloud.service;

import com.maiji.cloud.entities.shopingmall.ShopingCart;
import com.baomidou.mybatisplus.service.IService;
import com.maiji.cloud.request.shopingmall.ShopingCartCheckReqData;
import com.maiji.cloud.response.BaseDataResDto;
import com.maiji.cloud.response.BaseMetaResDto;
import com.maiji.cloud.response.BaseResDto;
import com.maiji.cloud.response.shopingmall.ShopingCartChosenResData;
import com.maiji.cloud.response.shopingmall.ShopingCartResData;
import com.maiji.cloud.response.shopingmall.ShopingOrderResData;

import java.util.List;

public interface ShopingCartService extends IService<ShopingCart> {

    BaseResDto addToShopingCart(List<String> goodsIds, Integer quantity, String token);

    BaseMetaResDto<List<ShopingCartResData>> FindAllShopingCart(String token);

    BaseDataResDto<Integer> findUserShopingCartCount(String token);

    List<ShopingCartResData> findAllResData(List<ShopingCart> shopingCartList);

    BaseDataResDto<ShopingCartChosenResData> chosenShopingCart(ShopingCartCheckReqData data, String token);

    BaseResDto updateShopingCartQuantity(String shopingCartId, Integer purchaseQuantity);

    BaseResDto delShopingCart(List<String> shopingCartIds);

    Integer orderSubmitCalculate (ShopingOrderResData shopingOrderResData, List<String> shopingCartIds);

}